import {
	http
} from '../httpIndex.js'

export default {
	// 宿舍列表
	getAppDormitoryList() {
		return http.get(
			`app/ManualAttence/getAppDormitoryList`,
		)
	},
	// 宿舍学生列表
	getStudentByDormitoryId(dormitoryId) {
		return http.get(
			`app/Student/getStudentByDormitoryId/${dormitoryId}`,
		)
	},
	// 获取学生信息
	getStudentById(id) {
		return http.get(
			`app/Student/getStudentById/${id}`,
		)
	},
	// 查询班级信息
	getClassInfoByClassId(id) {
		return http.get(
			`app/Class/getClassInfoByClassId/${classId}`,
		)
	},

	// 创建申请单
	createApply(data) {
		return http.post(
			`app/notReturned/createApply`, data
		)
	},

	// 查询申请单列表
	getPagelist(data) {
		return http.post(
			`app/notReturned/pageList`, data
		)
	},

	// 撤销申请
	cancelApply(data) {
		return http.post(
			`app/notReturned/cancelApply`, data
		)
	},


	// 拨打电话得记录
	createRecords(data) {
		return http.post(
			`app/sdAttence/trackRecord/create`, data
		)
	},

	// 获取记录
	getTrackRecordByDateAndStuId(date, id) {
		return http.get(
			`app/sdAttence/trackRecord/getTrackRecordByDateAndStuId?contactDate=${date}&studentId=${id}`,
		)
	},
	
	// 获取数据面板数据
	getBoardData(userId, type) {
		return http.get(`app/Attence/getAttenceBoardData?userId=${userId}&type=${type}`)
	},
	
	// 获取月度统计数据
	getMonthlyBoardData(userId, type) {
		return http.get(`app/Attence/getMonthlyStatisticalData?userId=${userId}&type=${type}`)
	}
}
